@font-face {
    font-family: 'Ubuntu Mono';
    src: local('Ubuntu Mono'),
         url('/assets/ubmonor.woff') format('woff'),
         url('/assets/ubmonor.ttf') format('truetype');
}

@font-face {
    font-family: 'Ubuntu Mono';
    src: local('Ubuntu Mono Bold'),
         url('/assets/ubmonob.woff') format('woff'),
         url('/assets/ubmonob.ttf') format('truetype');
    font-weight: bold;
}

@font-face {
    font-family: 'Ubuntu Mono';
    src: local('Ubuntu Mono Italic'),
         url('/assets/ubmonoi.woff') format('woff'),
         url('/assets/ubmonoi.ttf') format('truetype');
    font-style: italic;
}

@font-face {
    font-family: 'Ubuntu Mono';
    src: local('Ubuntu Mono Bold Italic'),
         url('/assets/ubmonoz.woff') format('woff'),
         url('/assets/ubmonoz.ttf') format('truetype');
    font-weight: bold;
    font-style: italic;
}

html {
    scroll-behavior: smooth;
}

[id] {
    scroll-margin-top: 30px;
}

sup[id], span[id] {
    display: inline-block;
}

sup {
    line-height: .8em;
}

main {
    overflow: visible !important;
}

main .mdl-grid {
    margin: 0;
    padding: 0;
    background: white;
    min-height: 100vh;
}

@media screen and (min-width: 840px) and (max-width: 1099px) {
    main .mdl-grid {
        margin: 0 10px;
        box-shadow: 0 0 20px #a7a7a7;
    }
}

@media screen and (min-width: 1100px) {
    main .mdl-grid {
        margin: 0 7% 0 13%;
        box-shadow: 0 0 10px #a7a7a7;
    }

    main .search-page {
        margin: 0 10%;
    }
}

.mdl-layout__container, .mdl-layout {
    overflow: visible;
    height: initial;
}

body {
    font-family: "Segoe UI", Ubuntu, "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
    background: #e8e8e8;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.mdl-navigation__link {
    transition: background-color .25s .1s;
}

.mdl-navigation__link:hover {
    text-decoration: none;
    transition: background-color .1s;
}

.article .footnote li {
    opacity: 0.6;
    font-size: 90%;
    transition: opacity .25s;
}

.article .footnote li:hover {
    opacity: 1;
}

#comments p:hover, #comments li:hover, #comments li:hover, #comments h1:hover, #comments h2:hover, #comments h3:hover, #comments h4:hover, #comments h5:hover, #comments h6:hover {
    background: none;
}

.article {
    counter-reset: fig;
    margin: 40px 20px;
}

.article * {
    font-size: 16px;
}

.article * * {
    font-size: inherit;
}

.article h1, .article h2, .article h3, .article h4, .article h5, .article h6 {
    font-family: inherit;
}

.article h2:before {
    content: "§ ";
    color: rgba(32, 150, 243,.7);
    font-size: 1.1em;
    font-weight: bold;
    vertical-align: top;
}

.article h2, .article h3, .article h4, .article h5, .article h6 {
    margin: 1em 0 .25em 0;
}

.article h1 + h2, .article h2 + h3, .article h3 + h4, .article h4 + h5, .article h5 + h6, .article h2:first-of-type .article h3:first-of-type, .article h4:first-of-type, .article h5:first-of-type, .article h6:first-of-type {
    margin-top: .25em;
}

.article h1 {
    font-size: 2.8em;
    color: #0077bb;
}

.article h2 {
    font-size: 1.8em;
}

.article h3 {
    font-size: 1.6em;
}

.article h4 {
    font-size: 1.4em;
}

.article h5 {
    font-size: 1.2em;
}

.article h6 {
    font-size: 1.1em;
}

.article p, .article center {
    text-align: justify;
    text-justify: newspaper;
    text-justify: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    -webkit-hyphens: auto;
    hyphens: auto;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hanging-punctuation: allow-end;
}

.article p {
    margin: .15em 0 .15em 0;
}

.article ol {
    margin: .5em 0 .5em 0;
}

.article img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    transition: outline-color .25s .2s;
    outline: white 1px dashed;
}

.article img:hover {
    outline: silver 1px dashed;
}

.article pre {
    margin: 4px 5px 2px 5px;
}

.article a {
    color: #2195f3;
    word-break: break-all;
}

.article table {
    border-collapse: collapse;
    width: 100%;
    margin: .5em 0 .5em 0;
}

.article tr {
    line-height: 30px;
    transition: background .25s .1s;
}

.article tr:hover {
    background: #f5f5f5;
    transition: background .1s;
}

.article td, th {
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 5px;
    padding-bottom: 5px;
    text-align: center;
}

.article td {
    border: 1px solid #DDDDDD;
}

.article th {
    background-color: #f6f6f6e6;
    border: 1px solid #CCCCCC;
    position: -webkit-sticky;
    position: sticky;
    top: 15px;
    z-index: 1;
}

.article td.code {
    text-align: left;
    width: 100%;
}

.article blockquote {
    background: #f5f5f5;
    color: #272727;;
    border-left: 10px solid #cccccc;
    margin: .5em 0 .5em 0;
    padding: .1em 1em .1em 1em;
    font-style: normal;
    font-family: inherit;
    transition: border-left .25s .2s;
}

.article blockquote::before {
    display: none;
}

.article blockquote::after {
    display: none;
}

.article blockquote:hover {
    border-left: 10px solid #2096f3;
}

.article blockquote > p {
    width: 100%;
    margin: 9px 0 9px 0;
}

.article .label {
    border-radius: 3px;
    background-color: #3ea9f3;
    color: white;
    font-size: 80%;
    font-weight: bold;
    margin: .1em 0 .1em 0;
    padding: 2px 4px;
    display: inline-block;
}

.article center {
    width: fit-content;
    max-width: 90%;
    margin: auto;
    font-size: 15px;
    opacity: 0.6;
    transition: opacity .25s;
}

.article center:hover {
    opacity: 1;
}

.article .figcaption:before {
    counter-increment: fig;
    content: "Fig." counter(fig) ". ";
    font-weight: bold;
}

pre, code {
    font-family: Consolas, 'Ubuntu Mono', monospace;
    hyphens: none;
    /*word-wrap: break-word;
    word-break: break-all;
    white-space: pre-wrap;*/
}

.article .footnote-ref {
    font-size: 80%;
}

.article .footnote-ref:before {
    content: '[';
}

.article .footnote-ref:after {
    content: ']';
}

.article .mdl-tooltip {
    line-height: 1.1em;
}

.article qed:after {
    font-family: KaTeX_AMS;
    content: "■";
    float: right;
}

.article hr {
    border-top: 1px dashed #ccc;
}

.article .op {
    font-variant-caps: petite-caps;
    font-family: "CMU Concrete", monospace;
    font-size: 1.2em;
}

.article .url {
    word-break: break-all;
}

div.toc ul {
    padding-left: 1.35em;
    margin: 0;
}

div.toc li {
    line-height: 140%;
}

.mdl-card {
    min-height: 10px;
}

.mdl-layout__drawer-button, .mdl-layout__drawer {
    position: fixed;
}

.mdl-layout__drawer-button {
    background: none !important;
}

.drawer-icon {
    vertical-align: bottom;
}

.drawer-title {
    font-family: Ubuntu, 'Open Sans', 'Segoe UI', Merriweather, Georgia, serif;
    font-style: italic;
    color: #0077bb;
}

header {
    position: fixed;
    top: -48px;
    color: transparent !important;
    box-shadow: none !important;
    background-color: rgba(33, 150, 243, .9) !important;
    transition: color .2s .4s, top .25s .5s, max-height .25s .5s cubic-bezier(.4,0,.2,1) !important;
}

header:hover {
    color: white !important;
    top: 0;
    transition: color .2s .4s, top .25s .2s, max-height .25s .2s cubic-bezier(.4,0,.2,1) !important;
}

@media screen and (max-width: 1024px) {
    header {
        top: -40px;
    }
}

header .material-icons {
    line-height: 48px;
}

header .mdl-textfield {
    margin-top: .6em;
}

.panel {
    margin: 20px 0;
    background-color: #ffffff;
    border: 1px solid transparent;
    border-radius: 4px;
    -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
    box-shadow: 0 1px 1px rgba(0, 0, 0, .05);
}

.panel-info {
    border-color: #dddddd;
}

.panel-heading {
    padding-left: 15px;
    border-bottom: 1px solid transparent;
    border-top-right-radius: 3px;
    border-top-left-radius: 3px;
}

.panel-info > .panel-heading {
    color: white;
    background-color: #2196f3;
    border-color: #dddddd;
}

.panel-body {
    padding: 15px;
}

h3.panel-title {
    font-size: 20px;
    margin-top: 0;
    margin-bottom: 0;
}

.gitment-container, .gitment-editor-tab, .gitment-editor-submit {
    font-family: 'Segoe UI', 'Open Sans', 'Ubuntu', 'Microsoft YaHei UI', 'Microsoft YaHei', sans-serif;
}

.gitment-editor-submit {
    border-radius: 3px;
}

.sidebar {
    width: unset;
    max-width: calc(35% - 16px);
    margin: 0 8px 0 8px;
    position: -webkit-sticky;
    position: sticky;
    top: 16px;
    align-self: flex-start;
    flex-shrink: 1;
}

.sidebar .article {
    margin: 0;
    padding: 48px 20px 40px 15px;  /* 104 = 64 + 40 */
    height: calc(100vh - 104px);
    overflow: auto;
}

.sidebar .mdl-card {
    min-width: 16vw;
    max-width: 20em;
    margin: 0 auto;
    opacity: .2;
    filter: grayscale(100%);
    background: silver;
    transition: all .4s .2s;
}

.sidebar .mdl-card:hover {
    opacity: 1;
    filter: none;
    background-color: rgb(33,150,243,.9);
    box-shadow: 0 3px 4px 0 rgba(0,0,0,.14), 0 3px 3px -2px rgba(0,0,0,.2), 0 1px 8px 0 rgba(0,0,0,.12);
    transition: all .25s;
}

.sidebar .mdl-card__supporting-text {
    padding: 1em;
    width: calc(100% - 2em);
    background: white;
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}

.sidebar .article::-webkit-scrollbar {
    display: none;
}

@media screen and (min-width: 1100px) {
    .main-cell {
        flex-grow: 1;
        width: 0;
    }

    .main-article {
        margin-right: 0;
    }

    .main-article-simple {
        margin-right: 20px;
    }
}

@media screen and (max-width: 1099px) {
    .sidebar {
        display: none !important;
    }

    .main-cell {
        width: calc(100% - 16px);
    }
}

.sidebar .sidebar-card {
    width: 100%;
    overflow: visible;
}

.sidebar .sidebar-title {
    padding: .5em 1em;
    font-size: 1.2em;
    background-color: inherit;
    opacity: 0.7;
    position: -webkit-sticky;
    position: sticky;
    top: -49px;
    z-index: 3;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.nano.mdl-card {
    padding-top: 0;
    background-position: center;
    background-size: cover;
    background-image: url('/assets/nano-edge.png');
}

.nano.mdl-card:hover {
    background-image: url('/assets/nano.jpg');
    background-color: silver;
    padding-top: calc(60% - 3em);
}

.nano > .mdl-card__actions {
    min-height: 3em;
    padding: 1em;
    background: rgba(0, 0, 0, .45);
    position: sticky;
    position: -webkit-sticky;
    bottom: -40px;
    border-bottom-left-radius: inherit;
    border-bottom-right-radius: inherit;
}

.nano .nano-ref {
    flex-grow: 1;
}

.nano .nano-shell {
    color: white;
    font-size: 1.1em;
    font-family: Consolas, 'Ubuntu Mono', monospace;
    font-weight: bold;
    word-wrap: break-word;
    word-break: break-all;
}

.nano .nano-shell a {
    text-decoration: none;
    font-style: italic;
    font-weight: bold;
    color: white;
}

.nano .nano-shell a:hover {
    text-decoration: underline;
    font-style: italic;
    font-weight: bold;
    color: white;
}

.nano .nano-shell .shell-start {
    color: #2196f3;
}

tex + br {
    display: none;
}

.katex-display, .MathJax_SVG_Display, .MathJax_Display {
    display: block;
    overflow-x: auto;
    overflow-y: hidden;
}

.katex-display {
    font-size: 1.15em;
    padding: 1px 0;
}

tex .katex-display > .katex {
    padding-left: 4em;
    text-align: left;
}

.katex .tag {
    position: relative !important;
    float: right;
}

.codehilitetable td {
    padding: 0;
    line-height: 1.15em;
    border: none;
}

.codehilitetable, .codehilitetable tbody, .codehilitetable tr {
    display: flex;
    width: 100%;
    transition: none;
}

.codehilitetable tr:hover {
    background: initial;
}

.code {
    display: block;
    overflow-x: auto;
    background: #f8f8f8;
}

.code pre {
    margin: .1em 0 .1em .5em;
}

.linenos {
    min-width: 2rem;
    text-align: right !important;
    border-right: solid 1px silver !important;
    background: #f5f5f5;
}

.linenos pre {
    margin: .1em .25em .1em 0;
    color: silver;
}

.mathopt-head {
    color: black;
    font-size: 120%;
    padding-bottom: 5px;
    padding-top: 8px;
    display: block;
}

.gitment-footer-container {
    display: none;
}

.gitment-comments-init-btn, .gitment-editor-submit, .gitment-comments-init-btn:disabled, .gitment-editor-submit:disabled {
    background-color: #2196f3;
}

.mdl-mega-footer {
    border-top: 10px solid gray;
}

.mdl-mega-footer__bottom-section {
    text-align: right;
}

@keyframes highlight {
    0% {
        background: #ffd000;
    }
    100% {
        background: none;
    }
}

.jump-highlight {
   animation: highlight 3s;
}

.tipue_search_content_title {
    font-size: 1.2em;
}

.tipue_search_content_url {
    font-size: 0.8em;
}

#tipue_search_foot {
    text-align: center;
}

.codehilite .hll { background-color: #ffffcc }
.codehilite { background: #f8f8f8; color: black }
.codehilite .cp { color: #4b4b4b }
.codehilite .o { color: #707070 }
.codehilite .c, .codehilite .ch, .codehilite .cm, .codehilite .cpf, .codehilite .c1, .codehilite .cs {
    color: #a4a4a4;
    font-style: italic;
}
.codehilite .k, .codehilite .kc, .codehilite .kd, .codehilite .kn, .codehilite .kp, .codehilite .kr {
    color: black;
    font-weight: bold;
}
.codehilite .kt { color: black; font-weight: bold; font-style: italic }

.cc {
    border-width:0;
    filter: brightness(70%);
    height: 1.21em;
    vertical-align: sub;
    image-rendering: pixelated;
}
